$(function(){
    function config(){
        var baseUrl = 'http://192.168.0.103:53785';
        var token = localStorage.getItem('token');
        $.ajaxSetup({
            headers: {
                'Authorization': 'Bearer ' + token
            },
            contentType: 'application/json; charset=utf-8',
            dataType:'json',
            complete: function(xhr) {
                if(xhr.status == 401){
                    window.location.href = '/login.html';
                }
            }
        });
        return{
            BASE_URL:baseUrl,
        }
    }

    window.Config = config();
})